home *** CD-ROM | disk | FTP | other *** search
/ Champak 106 / Vol 106.iso / games / insuranc.swf / scripts / __Packages / Summary.as < prev   
Encoding:
Text File  |  2010-04-12  |  1.8 KB  |  72 lines

  1. class Summary extends MovieClip
  2. {
  3.    var bWin;
  4.    var mcAnim;
  5.    var btnSend;
  6.    var btnQuote;
  7.    var mcWinLose;
  8.    var onEnterFrame;
  9.    var outTime = 25;
  10.    function Summary()
  11.    {
  12.       super();
  13.    }
  14.    function init1(Void)
  15.    {
  16.       if(this.bWin)
  17.       {
  18.          this.mcAnim.gotoAndStop(1);
  19.       }
  20.       else
  21.       {
  22.          this.mcAnim.gotoAndStop(Game.getInstance().sEnemy);
  23.       }
  24.       this.btnSend.onRelease = mx.utils.Delegate.create(this,this.onReleaseSend);
  25.       this.btnQuote.onRelease = mx.utils.Delegate.create(this,this.onReleaseQuote);
  26.    }
  27.    function init2(Void)
  28.    {
  29.       ┬º┬ºpush(this.stop());
  30.       if(this.bWin)
  31.       {
  32.          this.mcWinLose.gotoAndStop("passed");
  33.       }
  34.       else
  35.       {
  36.          this.mcWinLose.gotoAndStop("failed");
  37.       }
  38.       this.mcWinLose.btnPlayAgain.onRelease = mx.utils.Delegate.create(this,this.onReleasePlay);
  39.       var _loc2_ = Game.getInstance().points;
  40.       var _loc4_ = 5;
  41.       var _loc3_ = _loc2_.toString().length;
  42.       var _loc5_ = "00000";
  43.       this.mcWinLose.points = _loc5_.substr(0,_loc4_ - _loc3_) + _loc2_;
  44.    }
  45.    function onReleaseQuote(Void)
  46.    {
  47.       this.getURL("http://www.easymoneyinsurance.com","_blank");
  48.    }
  49.    function onReleaseSend(Void)
  50.    {
  51.       this.getURL("http://www.easymoney.com/friend","_blank");
  52.    }
  53.    function onReleaseEasy(Void)
  54.    {
  55.       this.getURL("http://www.easymoney.com","_blank");
  56.    }
  57.    function onReleasePlay(Void)
  58.    {
  59.       this.mcWinLose.btnPlayAgain.enabled = false;
  60.       this.onEnterFrame = this.countdown;
  61.       this.mcAnim.mcMovie.gotoAndPlay("OUT");
  62.    }
  63.    function countdown(Void)
  64.    {
  65.       this.outTime = this.outTime - 1;
  66.       if(this.outTime <= 0)
  67.       {
  68.          _root.gotoAndStop("front");
  69.       }
  70.    }
  71. }
  72.